// 导入 layout 和 考勤设置
import Layout from '@/layout'
import attendances from '@/views/attendances'
// 组织架构的路由规则设置
export default {
  //  path: '/attendances'  线上服务器问题，禁用这个路由
  path: '/attendance',
  name: 'attendances',
  component: Layout,
  children: [
    {
      path: '', // 如果是从/attendances 请求,则除了加载Layout之外，还会加载该元素中path为空的路由，即attendances 的内容

      name: 'attendances',
      component: attendances,
      // meta  负责给 侧边栏的 slot="title" 传值
      meta: {
        title: '考勤',
        icon: 'dashboard'
      }
    },
    {
      path: 'archiving',
      component: () => import('@/views/attendances/historical'),
      name: 'archiving',
      hidden: true,
      meta: {
        title: '归档'
      }
    },
    {
      path: 'report/:month',
      component: () => import('@/views/attendances/report'),
      name: 'reports',
      hidden: true,
      meta: {
        title: '报表'
      }
    }
  ]
}